package com.ctsi.security;

import com.ctsi.commons.util.response.Page;
import com.ctsi.security.domain.SRole;

import java.util.List;
import java.util.Map;

/**
 * 通过人员信息获得Srole
 * @author qiudzh
 *
 */
public interface PartySrole {
	/**
	 * 不带权限的根据用户登录Id查找相应角色
	 * 
	 * @param loginId
	 * @param startIndex
	 * @return
	 */
	public Page<SRole> getSRolesByLoginId(String loginId, Map<String, Object> conds, int startIndex);
	
	public abstract Page queryRole(String userLogin, String dataObjectType,
                                   String action, int pageSize, int startIndex);

	
	public abstract Page queryRoleByName(String userLogin,
                                         String dataObjectType, String action, int pageSize, int startIndex,
                                         String roleName);

	
	public abstract Page queryRole(String userLogin, String dataObjectType,
                                   String action, int pageSize, int startIndex,
                                   Map<String, Object> params);

	
	public abstract List<SRole> getSRolesByPartyId(String userLoginId,
                                                   String dataObjectType, String action, String partyId);

	
	public abstract Page<Map<String, Object>> queryPersonSec(
            String userLoginId, String loginId, String name, int startIndex,
            int pageSize);

	
	public abstract Page<SRole> getSRolesByLoginId(String userLoginId,
                                                   String dataObjectType, String action, String loginId,
                                                   Map<String, Object> conds, int startIndex);
	
	public ISecurity getSecurity();
	
	public abstract List<SRole> findAllSroleByPartyId(String partyId, String roleType);

}

